package net.huashitong.supervision.task.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
import net.huashitong.supervision.task.dao.OrderScoreDao;
import net.huashitong.supervision.task.entity.OrderScore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @BelongsProject: synthetical-project
 * @BelongsPackage: net.huashitong.supervision.task.service
 * @Author: ling
 * @CreateTime: 2020-04-01 20:25
 * @Description:
 */
@Service
public class OrderScoreService extends StringPKService<OrderScore> {
    @Autowired
    private OrderScoreDao dao;
    @Autowired
    private SysTableService tableService;
    @Override
    protected BaseDao<OrderScore, String> getDao() {
        return dao;
    }

    @Override
    protected void beforeSave(OrderScore obj) {
        obj.setSysId(tableService.updateMaxSysId("t_order_score",null));
    }
}
